package com.walle.concurrenttest.pattern.balking;

/**
 * @author zhangjiapeng
 * @Package com.walle.concurrenttest.pattern.balking
 * @Description: ${todo}
 * @date 2019/2/19 11:36
 */
public class DataTest {

    public static void main(String[] args) {
        Data data = new Data("data.txt");
        Thread saveThread = new Thread(new SaveThread(data));
        Thread changeThread = new Thread(new ChangeThread(data));

        saveThread.setName("保存线程：");
        changeThread.setName("修改线程：");


        saveThread.start();
        changeThread.start();
    }
}
